const express = require('express')
const router = express.Router()
// 引入路由校验
const expressJoi = require('@escook/express-joi')
const {update_userinfo_schema} = require('../schema/user')

const { getUserinfo,updateUserinfo} = require('../router_handler/userinfo.js')

router.get('/userinfo', getUserinfo)
// 更新用户信息
// 第二个参数就是我们校验处理
router.post('/userinfo',expressJoi(update_userinfo_schema), updateUserinfo)

module.exports = router